//
//  MCNewMarketingHeadView.swift
//  StoreManage
//
//  Created by MC on 2018/6/26.
//  Copyright © 2018年 MC. All rights reserved.
//

import UIKit

class MCNewMarketingHeadView: UIView {

    
    public var viewController : UIViewController?
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        self.backgroundColor = UIColor.MCGray_light
        
        self.addSubview(writeView)
        writeView.snp.remakeConstraints { (make) ->Void in
            make.left.right.top.equalTo(self)
            make.height.equalTo(240)
        }
        
        self.addSubview(timeView)
        timeView.snp.remakeConstraints { (make) ->Void in
            make.left.right.equalTo(self)
            make.top.equalTo(writeView.snp.bottom).offset(5)
            make.height.equalTo(265)
        }
        
        self.addSubview(statusView)
        statusView.snp.remakeConstraints { (make) ->Void in
            make.left.right.equalTo(self)
            make.top.equalTo(timeView.snp.bottom).offset(5)
            make.height.equalTo(44)
        }

        self.addSubview(statusView)
        statusView.snp.remakeConstraints { (make) ->Void in
            make.left.right.equalTo(self)
            make.top.equalTo(timeView.snp.bottom).offset(5)
            make.height.equalTo(44)
        }

        self.addSubview(addGoodsView)
        addGoodsView.snp.remakeConstraints { (make) ->Void in
            make.left.right.equalTo(self)
            make.top.equalTo(statusView.snp.bottom).offset(5)
            make.height.equalTo(52)
        }

        let height = 240 + 270 + 49 + 57
        
        self.frame = CGRect.init(x: 0, y: 0, width: 0, height: height)
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    lazy var writeView: MCNewMarketingHead_textView = {
        let view = MCNewMarketingHead_textView()
        view.backgroundColor = UIColor.white
        return view
    }()
    
    lazy var timeView: MCNewMarketingHead_timeView = {
        let view = MCNewMarketingHead_timeView()
        view.backgroundColor = UIColor.white

        return view
    }()
    
    lazy var statusView: MCNewMarketingHead_statusView = {
        let view = MCNewMarketingHead_statusView()
        view.backgroundColor = UIColor.white
        return view
    }()
    
    lazy var addGoodsView: MCNewMarketingHead_addGoodsView = {
        let view = MCNewMarketingHead_addGoodsView()
        view.backgroundColor = UIColor.white
        return view
    }()

}


